/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kwikMart.business;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author WIL
 */
@Stateless
public class HelperEJB implements HelperEJBLocal {

    @PersistenceContext(unitName = "Kwik-E-Mart-ejbPU")
    private EntityManager em;

    @Override
    public void limpiarCache() {
        em.getEntityManagerFactory().getCache().evictAll();
    }

    // Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Business Method")
    public void persist(Object object) {
        em.persist(object);
    }
}
